import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'Layout',
      redirect: '/home',
      component: () => import('../views/Layout/index.vue'),
      children: [
        {
          path: '/home',
          name: 'Home',
          component: () => import('../views/Home/index.vue'),
        },
        {
          path: '/about',
          name: 'About',
          component: () => import('../views/About/index.vue'),
        },
      ],
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('../views/Login/index.vue'),
    },
  ],
})

export default router
